package tech.aistar.mapper;

import org.apache.ibatis.annotations.Select;
import tech.aistar.entity.User;

import java.util.List;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/9/4
 * @Version: 1.0
 */
public interface UserMapper {
    //查找全部
    List<User> findAll();
    //根据id查找
    User getById(Integer id);
    //根据姓名查找
    @Select("select * from user where username = #{value}")
    User findByUsername(String username);
    //插入
    void add(User user);
    //根据id修改
    void updateById(User user);
    //根据id删除
    void delById(Integer id);
}
